Reduce the need for Mailer::class in protocols

This commit is contained in:
2024-11-08 23:13:04 +11:00
parent ff4ecddb76
commit f0f2d74a14
5 changed files with 42 additions and 30 deletions

View File

@@ -94,13 +94,11 @@ class AddressPoll implements ShouldQueue, ShouldBeUnique
switch ($o->name) {
case 'BINKP':
$s = new Binkp;
$mo = Mailer::where('name','BINKP')->singleOrFail();
break;
case 'EMSI':
$s = new EMSI;
$mo = Mailer::where('name','EMSI')->singleOrFail();
break;
@@ -116,7 +114,7 @@ class AddressPoll implements ShouldQueue, ShouldBeUnique
try {
$client = SocketClient::create($this->ao->system->address,$o->pivot->port);
if (($s->session($mo,$client,$this->ao) & Protocol::S_MASK) === Protocol::S_OK) {
if (($s->session($client,$this->ao) & Protocol::S_MASK) === Protocol::S_OK) {
Log::info(sprintf('%s:= Connection ended successfully with [%s] (%s)',self::LOGKEY,$client->address_remote,$this->ao->ftn));
return;