Refuse a maxOctets below 1 at startup, like the other limits #24
+2
-2
@@ -35,8 +35,8 @@
|
||||
- An `alert_notification` or an `outbind` from the peer is logged and left unanswered, as SMPP 3.4
|
||||
gives neither a response. Each one used to emit `sessionError`, `"alert_notification" has no
|
||||
response command`.
|
||||
- `server()` refuses a `maxOctets` below 1 or not a whole number, like its other limits.
|
||||
`server({ maxOctets: 0 })` used to start and then drop every multipart message.
|
||||
- `server()` refuses a `maxOctets` below 1 or not a whole number, `Infinity` included, like its
|
||||
other limits. `server({ maxOctets: 0 })` used to start and then refuse every multipart message.
|
||||
|
||||
## 0.5.0
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ import { DlrMerger } from '../src/dlr-merger.ts';
|
||||
import { PduFramer } from '../src/pdu-framer.ts';
|
||||
import { ReconnectLoop } from '../src/reconnect-loop.ts';
|
||||
import { Session, bindCommands } from '../src/session.ts';
|
||||
import { checkSessionOptions } from '../src/session-options.ts';
|
||||
import { client } from '../src/client.ts';
|
||||
import { closeAfter, closeListenerAfter } from './teardown.ts';
|
||||
import { consts } from '../src/defs/constants.ts';
|
||||
@@ -2694,6 +2695,7 @@ describe('option validation', () => {
|
||||
if (listening.server) await listening.server.close();
|
||||
|
||||
assert.match(listening.err?.message ?? '', /maxOctets must be 1 or more, got 0/);
|
||||
assert.match(checkSessionOptions({ maxOctets: Infinity }).err?.message ?? '', /maxOctets must be 1 or more, got Infinity/);
|
||||
});
|
||||
|
||||
test('returns an error rather than rejecting on an impossible port', async () => {
|
||||
|
||||
Reference in New Issue
Block a user