Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/ApnChannel.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ public function send($notifiable, Notification $notification)
'error' => $response->getCode(),
])
);
//connection is useless so create a new connection
$this->closeConnection();
$this->openConnection();
}
} catch (Exception $e) {
throw SendingFailed::create($e);
Expand Down
8 changes: 4 additions & 4 deletions tests/ApnChannelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

namespace NotificationChannels\Gcm\Test;

use Mockery;
use PHPUnit_Framework_TestCase;
use Illuminate\Events\Dispatcher;
use Illuminate\Notifications\Notifiable;
use NotificationChannels\Apn\ApnChannel;
use Illuminate\Notifications\Notification;
use NotificationChannels\Apn\ApnFeedback;
use NotificationChannels\Apn\ApnMessage;
use PHPUnit_Framework_TestCase;
use Mockery;
use NotificationChannels\Apn\ApnFeedback;
use Illuminate\Notifications\Notification;
use ZendService\Apple\Apns\Client\Message as Client;
use ZendService\Apple\Apns\Client\Feedback as FeedbackClient;
use ZendService\Apple\Apns\Response\Message as MessageResponse;
Expand Down