kikocis/java-driver public
Changesets · Branches · Tags · Compare
| Changeset | 2529393d30136072be16d1a159542c1f3f8f3378c004729b23dc90fff5f6f717 |
|---|---|
| Author | olim7t <omichallat+github@gmail.com> · 2016-05-10 09:42 -07:00 |
| Committer | olim7t <omichallat+github@gmail.com> · 2016-05-10 09:42 -07:00 |
| Parents | b0c37523b22c |
1 file changed
modified driver-core/src/main/java/com/datastax/driver/core/SessionManager.java +3 −2
| @@ -617,9 +617,10 @@ | ||
| 617 | 617 | |
| 618 | 618 | @Override |
| 619 | 619 | protected void checkNotInEventLoop() { |
| 620 | - if (!CHECK_IO_DEADLOCKS) | |
| 620 | + Connection.Factory connectionFactory = cluster.manager.connectionFactory; | |
| 621 | + if (!CHECK_IO_DEADLOCKS || connectionFactory == null) | |
| 621 | 622 | return; |
| 622 | - for (EventExecutor executor : cluster.manager.connectionFactory.eventLoopGroup) { | |
| 623 | + for (EventExecutor executor : connectionFactory.eventLoopGroup) { | |
| 623 | 624 | if (executor.inEventLoop()) { |
| 624 | 625 | throw new IllegalStateException( |
| 625 | 626 | "Detected a synchronous Session call (execute() or prepare()) on an I/O thread, " + |