Connection starts if not already running in the receive() call.

This commit is contained in:
Mark Fisher
2008-10-28 17:42:22 +00:00
parent 45f8d5a9ac
commit b10afab6f4

View File

@@ -81,7 +81,9 @@ public class DefaultFolderConnection implements Lifecycle, DisposableBean, Folde
public synchronized Message[] receive() {
try {
this.openFolder();
if (!this.isRunning()) {
this.start();
}
if (!this.polling) {
((AsyncMonitoringStrategy) this.monitoringStrategy).waitForNewMessages(this.folder);
}